<!DOCTYPE html>
<html>
  <head><meta name="generator" content="Hexo 3.8.0">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="description" content="fengzhaoyang&#39;s blog">
  <meta name="keyword" content="hexo-theme, vuejs">
  
  <link rel="shortcut icon" href="/css/images/logo.png">
  
  <title>
    
    fzy-blog
    
  </title>
  <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/css/style.css">
  
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
  
  <script src="/js/qrious.js"></script>
  
  
  
  
    <!-- MathJax support START -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <!-- MathJax support END -->
  


</head>
<div class="wechat-share">
  <img src="/css/images/logo.png">
</div>
  <body>
    <header class="header fixed-header">
  <div class="header-container">
    <a class="home-link" href="/">
      <div class="logo"></div>
      <span>fzy-blog</span>
    </a>
    <ul class="right-list">
      
        <li class="list-item">
          
            <a href="/" class="item-link active">Home</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/tags/" class="item-link">Tags</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/archives/" class="item-link">Archives</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/project/" class="item-link">Projects</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/about/" class="item-link">About</a>
          
        </li>
      
    </ul>
    <div class="menu">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </div>
    <div class="menu-mask">
      <ul class="menu-list">
        
          <li class="menu-item">
            
              <a href="/" class="menu-link mobile-active">Home</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/tags/" class="menu-link">Tags</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/archives/" class="menu-link">Archives</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/project/" class="menu-link">Projects</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/about/" class="menu-link">About</a>
            
          </li>
        
      </ul>
    </div>
  </div>
</header>

    <main class="app-body">
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/CompletableFuture实例/">CompletableFuture实例</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      123456789101112131415161718192021222324252627282930313233343536373839404142434445464748@RequestMapping("/getStudentInfoWithCompletableFuture")publ ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/CompletableFuture实例/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/ConcurrentHashMap/">ConcurrentHashMap</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      http://www.cnblogs.com/dolphin0520/p/3932905.html

      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/ConcurrentHashMap/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/Java8新的异步编程方式CompletableFuture/">Java8 新的异步编程方式 CompletableFuture</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      Java8 新的异步编程方式 CompletableFuturehttps://juejin.im/post/59eae61b51882549fc512b34

      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/Java8新的异步编程方式CompletableFuture/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/CopyOnWriteArrayList与CollectionssynchronizedList的性能对比/">CopyOnWriteArrayList 与 Collections synchronizedList 的性能对比</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      CopyOnWriteArrayList 与 Collections synchronizedList 的性能对比列表实现有 ArrayList、Vector、CopyOnWriteArrayList、Collections.synchronizedList(list)四种方式。1 Arra ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/CopyOnWriteArrayList与CollectionssynchronizedList的性能对比/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/Java多线程总结之线程安全队列Queue/">Java多线程总结之线程安全队列Queue</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      http://hellosure.iteye.com/blog/1126541DelayQueue 延时队列https://blog.csdn.net/RenYuanJinZhang_gg/article/details/81061730

      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/Java多线程总结之线程安全队列Queue/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/Java多线程写同一个文件实现/">Java多线程写同一个文件实现</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      最近项目中需要从网站上抓取大量的数据，采用了多线程技术，每个线程抓取的数据都需要保存到一个文件中，避免消耗大量的内存。
思路：多个访问线程将需要写入到文件中的数据先保存到一个队列里面，然后由专门的 写出线程负责从队列中取出数据并写入到文件中。
WriterQueue.Java 存放要输出的数 ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/Java多线程写同一个文件实现/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/Java并发编程：Callable、Future和FutureTask/">Java并发编程：Callable、Future和FutureTask</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      http://www.cnblogs.com/dolphin0520/p/3949310.html

      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/Java并发编程：Callable、Future和FutureTask/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/Java主线程等待子线程、线程池/">Java主线程等待子线程、线程池</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      123456789101112public class TestThread extends Thread&#123;	public void run()&#123;		System.out.println(this.getName() + "子线程开始");		try&#123;			// ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/Java主线程等待子线程、线程池/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/Java并发编程：CountDownLatch、CyclicBarrier和Semaphore/">Java并发编程：CountDownLatch、CyclicBarrier和Semaphore</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      http://www.cnblogs.com/dolphin0520/p/3920397.html

      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/Java并发编程：CountDownLatch、CyclicBarrier和Semaphore/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/Java并发编程：Timer和TimerTask/">Java并发编程：Timer和TimerTask</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      http://www.cnblogs.com/dolphin0520/p/3938991.html

      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/Java并发编程：Timer和TimerTask/">全文...</a>
  </article>
  

  
  <div class="guide-pager">
  
    <a href="/page/15/"><span class="page-arrow">← </span>Prev</a>
  
  
    <a href="/page/17/">Next<span class="page-arrow"> →</span></a>
  
</div>
  
</main>
    <div class="scroll-top">
  <span class="arrow-icon"></span>
</div>
    <footer class="app-footer">
  <p class="copyright">
    &copy; 2019
  </p>
</footer>

<script>
  function async (u, c) {
    var d = document,
      t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) {
      o.addEventListener('load', function (e) {
        c(null, e);
      }, false);
    }
    s.parentNode.insertBefore(o, s);
  }
</script>
<script>
  async ("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function () {
    FastClick.attach(document.body);
  })
</script>

<script>
  var hasLine = 'true';
  async ("//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js", function () {
    $('figure pre').each(function (i, block) {
      var figure = $(this).parents('figure');
      if (hasLine === 'false') {
        figure.find('.gutter').hide();
      }
      var lang = figure.attr('class').split(' ')[1] || 'code';
      var codeHtml = $(this).html();
      var codeTag = document.createElement('code');
      codeTag.className = lang;
      codeTag.innerHTML = codeHtml;
      $(this).attr('class', '').empty().html(codeTag);
      figure.attr('data-lang', lang.toUpperCase());
      hljs.highlightBlock(block);
    });
  })
</script>
<!-- Baidu Tongji -->

<script src="/js/script.js"></script>
  </body>
</html>